home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01b.txt / 000178_icon-group-sender_Mon Nov 26 07:50:05 2001.msg < prev    next >
Internet Message Format  |  2002-01-03  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id fAQEmuo26815
  4.     for icon-group-addresses; Mon, 26 Nov 2001 07:48:56 -0700 (MST)
  5. Message-Id: <200111261448.fAQEmuo26815@baskerville.CS.Arizona.EDU>
  6. From: Art Eschenlauer <art.eschenlauer@sufsys.com>
  7. To: "''icon-group@CS.Arizona.EDU ' '" <icon-group@cs.arizona.edu>
  8. Subject: transmit ( expr @ coexpr_label ) - what is it, and how to use it?
  9. Date: Mon, 26 Nov 2001 07:11:10 -0600
  10. Errors-To: icon-group-errors@cs.arizona.edu
  11. Status: RO
  12. Content-Length: 1209
  13.  
  14. >From the Icon help files:
  15.  
  16. x1 @ C : x2 -- transmit value to co-expression 
  17. x1 @ C activates C, transmitting the value of x1 to it; it produces the
  18. outcome of activating C. 
  19.  
  20. @C : x -- activate co-expression 
  21. @C produces the outcome of activating C. 
  22.  
  23.  
  24. I found one example of the first syntax in the first edition of the Icon
  25. handbook, but I'm having trouble conceptualizing what it is doing.  That
  26. example showed use of the &main keyword but no example was given for use of
  27. the &source keyword.  The example was a "producer-consumer" implementation.
  28.  
  29.  
  30. Please enlighten me:
  31.  
  32. I thought that co-expressions existed to permit using a result sequence in a
  33. different place in the program from where it was defined.  The
  34. "transmission" syntax suggests that I should extend this conceptualization.
  35.  
  36.  
  37. What would you suggest?  
  38.  
  39. So far, I'm beginning to think of it like this:
  40.   @C means something like "read from a pipe" - the "outcome" that it
  41. produces, x, is the next result in the sequence of results produced by C
  42.   x1@C means something like "write to a pipe"" - I have no idea what the
  43. "outcome" that it produces, x2, is or how that outcome is affected by x1
  44.  
  45. how can I learn more about coexpressions in Icon?
  46.